<?php

namespace common\models\db\tables;

use Yii;

/**
 * This is the model class for table "{{%quene_job}}".
 *
 * @property string $id
 * @property string $title
 * @property string $script 任务脚本
 * @property int $created_at
 * @property int $created_by
 * @property int $status
 * @property int $cmd_return_code command returned value
 * @property string $stdout_content
 */
class QueneJob extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%quene_job}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['script', 'created_at', 'stdout_content'], 'required'],
            [['script', 'stdout_content'], 'string'],
            [['created_at', 'created_by', 'status', 'cmd_return_code'], 'integer'],
            [['title'], 'string', 'max' => 191],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'title' => Yii::t('app', 'Title'),
            'script' => Yii::t('app', '任务脚本'),
            'created_at' => Yii::t('app', 'Created At'),
            'created_by' => Yii::t('app', 'Created By'),
            'status' => Yii::t('app', 'Status'),
            'cmd_return_code' => Yii::t('app', 'command returned value'),
            'stdout_content' => Yii::t('app', 'Stdout Content'),
        ];
    }
}
